package org.urbanstew.soundclouddroid;

import android.app.ActionBar;
import android.app.Activity;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;

public class DisplayMessageActivity extends Activity {
	static final String STATE_SCORE = "playerScore";
	static final String STATE_LEVEL = "playerLevel";
	TextView textView; // Member variable for text view in the layout
	private Object mCamera;
	private int mCurrentScore;
	private int mCurrentLevel;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// Check whether we're recreating a previously destroyed instance
		if (savedInstanceState != null) {
			// Restore value of members from saved state
			// mCurrentScore = savedInstanceState.getInt(STATE_SCORE);
			// mCurrentLevel = savedInstanceState.getInt(STATE_LEVEL);
		} else {
			// Probably initialize members with default values for a new
			// instance
			Intent intent = getIntent();
			String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
			// Create the text view
			setContentView(R.layout.displaymessage);
			textView = (TextView) findViewById(R.id.textView1);
			// textView.setTextSize(40);
			textView.setText(message);

			// // Make sure we're running on Honeycomb or higher to use
			// ActionBar APIs
			if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
				// For the main activity, make sure the app icon in the action
				// bar
				// does not behave as a button
				ActionBar actionBar = getActionBar();
				actionBar.setHomeButtonEnabled(false);
			}
		}

	}

//	@Override
//	public void onPause() {
//		super.onPause(); // Always call the superclass method first
//
//		// Release the Camera because we don't need it when paused
//		// and other activities might need to use it.
//		if (mCamera != null) {
//			// mCamera.release();
//			mCamera = null;
//		}
//	}
//
//	@Override
//	public void onResume() {
//		super.onResume(); // Always call the superclass method first
//
//		// Get the Camera instance as the activity achieves full user focus
//		if (mCamera == null) {
//			// initializeCamera(); // Local method to handle camera init
//		}
//	}
//
//	@Override
//	protected void onStop() {
//		super.onStop(); // Always call the superclass method first
//
//		// Save the note's current draft, because the activity is stopping
//		// and we want to be sure the current note progress isn't lost.
//		ContentValues values = new ContentValues();
//		// values.put(NotePad.Notes.COLUMN_NAME_NOTE, getCurrentNoteText());
//		// values.put(NotePad.Notes.COLUMN_NAME_TITLE, getCurrentNoteTitle());
//
//		Uri mUri = null;
//		getContentResolver().update(mUri, // The URI for the note to update.
//				values, // The map of column names and new values to apply to
//						// them.
//				null, // No SELECT criteria are used.
//				null // No WHERE columns are used.
//				);
//	}
//
//	@Override
//	protected void onStart() {
//		super.onStart(); // Always call the superclass method first
//
//		// The activity is either being restarted or started for the first time
//		// so this is where we should make sure that GPS is enabled
//		LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
//		boolean gpsEnabled = locationManager
//				.isProviderEnabled(LocationManager.GPS_PROVIDER);
//
//		if (!gpsEnabled) {
//			// Create a dialog here that requests the user to enable GPS, and
//			// use an intent
//			// with the
//			// android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS action
//			// to take the user to the Settings screen to enable GPS when they
//			// click "OK"
//		}
//	}
//
//	@Override
//	protected void onRestart() {
//		super.onRestart(); // Always call the superclass method first
//
//		// Activity being restarted from stopped state
//	}
//
//	@Override
//	public void onSaveInstanceState(Bundle savedInstanceState) {
//		// Save the user's current game state
//		savedInstanceState.putInt(STATE_SCORE, mCurrentScore);
//		savedInstanceState.putInt(STATE_LEVEL, mCurrentLevel);
//
//		// Always call the superclass so it can save the view hierarchy state
//		super.onSaveInstanceState(savedInstanceState);
//	}
//
//	public void onRestoreInstanceState(Bundle savedInstanceState) {
//		// Always call the superclass so it can restore the view hierarchy
//		super.onRestoreInstanceState(savedInstanceState);
//
//		// Restore state members from saved instance
//		mCurrentScore = savedInstanceState.getInt(STATE_SCORE);
//		mCurrentLevel = savedInstanceState.getInt(STATE_LEVEL);
//	}

}
